<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
 <head>
  <title>dlag2s.f</title>
 <meta name="generator" content="emacs 21.3.1; htmlfontify 0.20">
<style type="text/css"><!-- 
body { background: rgb(255, 255, 255);  color: rgb(0, 0, 0);  font-style: normal;  font-weight: 500;  font-stretch: normal;  font-family: adobe-courier;  font-size: 11pt;  text-decoration: none; }
span.default   { background: rgb(255, 255, 255);  color: rgb(0, 0, 0);  font-style: normal;  font-weight: 500;  font-stretch: normal;  font-family: adobe-courier;  font-size: 11pt;  text-decoration: none; }
span.default a { background: rgb(255, 255, 255);  color: rgb(0, 0, 0);  font-style: normal;  font-weight: 500;  font-stretch: normal;  font-family: adobe-courier;  font-size: 11pt;  text-decoration: underline; }
span.string   { color: rgb(188, 143, 143);  background: rgb(255, 255, 255);  font-style: normal;  font-weight: 500;  font-stretch: normal;  font-family: adobe-courier;  font-size: 11pt;  text-decoration: none; }
span.string a { color: rgb(188, 143, 143);  background: rgb(255, 255, 255);  font-style: normal;  font-weight: 500;  font-stretch: normal;  font-family: adobe-courier;  font-size: 11pt;  text-decoration: underline; }
span.comment   { color: rgb(178, 34, 34);  background: rgb(255, 255, 255);  font-style: normal;  font-weight: 500;  font-stretch: normal;  font-family: adobe-courier;  font-size: 11pt;  text-decoration: none; }
span.comment a { color: rgb(178, 34, 34);  background: rgb(255, 255, 255);  font-style: normal;  font-weight: 500;  font-stretch: normal;  font-family: adobe-courier;  font-size: 11pt;  text-decoration: underline; }
 --></style>

 </head>
  <body>

<pre>
      SUBROUTINE <a name="DLAG2S.1"></a><a href="dlag2s.f.html#DLAG2S.1">DLAG2S</a>(M,N,A,LDA,SA,LDSA,INFO)
<span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  -- LAPACK PROTOTYPE auxiliary routine (version 3.1) --
</span><span class="comment">*</span><span class="comment">     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
</span><span class="comment">*</span><span class="comment">     November 2006
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">     .. WARNING: PROTOTYPE ..
</span><span class="comment">*</span><span class="comment">     This is an LAPACK PROTOTYPE routine which means that the
</span><span class="comment">*</span><span class="comment">     interface of this routine is likely to be changed in the future
</span><span class="comment">*</span><span class="comment">     based on community feedback.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">     .. Scalar Arguments ..
</span>      INTEGER INFO,LDA,LDSA,M,N
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">     .. Array Arguments ..
</span>      REAL SA(LDSA,*)
      DOUBLE PRECISION A(LDA,*)
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  Purpose
</span><span class="comment">*</span><span class="comment">  =======
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  <a name="DLAG2S.24"></a><a href="dlag2s.f.html#DLAG2S.1">DLAG2S</a> converts a DOUBLE PRECISION matrix, SA, to a SINGLE
</span><span class="comment">*</span><span class="comment">  PRECISION matrix, A.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  RMAX is the overflow for the SINGLE PRECISION arithmetic
</span><span class="comment">*</span><span class="comment">  <a name="DLAG2S.28"></a><a href="dlag2s.f.html#DLAG2S.1">DLAG2S</a> checks that all the entries of A are between -RMAX and
</span><span class="comment">*</span><span class="comment">  RMAX. If not the convertion is aborted and a flag is raised.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  This is a helper routine so there is no argument checking.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  Arguments
</span><span class="comment">*</span><span class="comment">  =========
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  M       (input) INTEGER
</span><span class="comment">*</span><span class="comment">          The number of lines of the matrix A.  M &gt;= 0.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  N       (input) INTEGER
</span><span class="comment">*</span><span class="comment">          The number of columns of the matrix A.  N &gt;= 0.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  A       (input) DOUBLE PRECISION array, dimension (LDA,N)
</span><span class="comment">*</span><span class="comment">          On entry, the M-by-N coefficient matrix A.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  LDA     (input) INTEGER
</span><span class="comment">*</span><span class="comment">          The leading dimension of the array A.  LDA &gt;= max(1,M).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  SA      (output) REAL array, dimension (LDSA,N)
</span><span class="comment">*</span><span class="comment">          On exit, if INFO=0, the M-by-N coefficient matrix SA.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  LDSA    (input) INTEGER
</span><span class="comment">*</span><span class="comment">          The leading dimension of the array SA.  LDSA &gt;= max(1,M).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  INFO    (output) INTEGER
</span><span class="comment">*</span><span class="comment">          = 0:  successful exit
</span><span class="comment">*</span><span class="comment">          &gt; 0:  if INFO = k, the (i,j) entry of the matrix A has
</span><span class="comment">*</span><span class="comment">                overflowed when moving from DOUBLE PRECISION to SINGLE
</span><span class="comment">*</span><span class="comment">                k is given by k = (i-1)*LDA+j
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  =========
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">     .. Local Scalars ..
</span>      INTEGER I,J
      DOUBLE PRECISION RMAX
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">     .. External Functions ..
</span>      REAL <a name="SLAMCH.67"></a><a href="slamch.f.html#SLAMCH.1">SLAMCH</a>
      EXTERNAL <a name="SLAMCH.68"></a><a href="slamch.f.html#SLAMCH.1">SLAMCH</a>
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">     .. Executable Statements ..
</span><span class="comment">*</span><span class="comment">
</span>      RMAX = <a name="SLAMCH.72"></a><a href="slamch.f.html#SLAMCH.1">SLAMCH</a>(<span class="string">'O'</span>)
      DO 20 J = 1,N
          DO 30 I = 1,M
              IF ((A(I,J).LT.-RMAX) .OR. (A(I,J).GT.RMAX)) THEN
                  INFO = (I-1)*LDA + J
                  GO TO 10
              END IF
              SA(I,J) = A(I,J)
   30     CONTINUE
   20 CONTINUE
   10 CONTINUE
      RETURN
<span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">     End of <a name="DLAG2S.85"></a><a href="dlag2s.f.html#DLAG2S.1">DLAG2S</a>
</span><span class="comment">*</span><span class="comment">
</span>      END

</pre>

 </body>
</html>
